<template>
  <div id="goodscentenr">
    <van-col span="24" class="centenr-1" @click="onGoGoodsList(history)">
      <van-col span="3" class="checkbox">
        <input type="checkbox" />
      </van-col>
      <van-col span="6" class="img">
        <div>
          <img :src="history.picUrl" alt="" />
        </div>
      </van-col>
      <van-col span="15" class="text">
        <p>{{ history.name }}</p>
        <p>{{ history.brief }}</p>
        <p>￥{{ history.retailPrice }}</p>
      </van-col>
    </van-col>
  </div>
</template>
<script>
export default {
  name,
  props: ['history'],
  data() {
    return {}
  },
  methods: {
    // 跳转对应的商品详情，并且获取当前商品的 详情信息
    onGoGoodsList() {
      console.log(this.history)
      let params = {
        id: this.history.valueId
      }
      this.$router.push({ path: '/goodslist', query: params })
    }
  }
}
</script>
<style lang="less" scoped>
.centenr-1 {
  margin-bottom: 0.1rem;
  width: 100%;
  background-color: #fff;
  .checkbox {
    text-align: center;
    line-height: 1rem;
  }

  .img {
    padding: 0.1rem;
    div {
      background-color: #f1f3f4;
      img {
        width: 100%;
      }
    }
  }
  .text {
    padding: 0.1rem;
    p:nth-child(1) {
    }
    p:nth-child(2) {
      font-size: 0.13rem;
      opacity: 0.7;
      margin: 0.1rem 0rem;
    }
    p:nth-child(3) {
      color: chocolate;
    }
  }
}
</style>
